Optimal. Leaf size=118 \[ \frac {\left (3 b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^4}+\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}+\frac {c^2 \left (3 b c^2+4 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{4 d^5} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {471, 92, 12, 65,
223, 212} \begin {gather*} \frac {c^2 \left (4 a d^2+3 b c^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{4 d^5}+\frac {x \sqrt {d x-c} \sqrt {c+d x} \left (4 a d^2+3 b c^2\right )}{8 d^4}+\frac {b x^3 \sqrt {d x-c} \sqrt {c+d x}}{4 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 65
Rule 92
Rule 212
Rule 223
Rule 471
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b x^2\right )}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx &=\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}-\frac {1}{4} \left (-4 a-\frac {3 b c^2}{d^2}\right ) \int \frac {x^2}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {\left (3 b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^4}+\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}+\frac {\left (3 b c^2+4 a d^2\right ) \int \frac {c^2}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx}{8 d^4}\\ &=\frac {\left (3 b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^4}+\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}+\frac {\left (c^2 \left (3 b c^2+4 a d^2\right )\right ) \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx}{8 d^4}\\ &=\frac {\left (3 b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^4}+\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}+\frac {\left (c^2 \left (3 b c^2+4 a d^2\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{4 d^5}\\ &=\frac {\left (3 b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^4}+\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}+\frac {\left (c^2 \left (3 b c^2+4 a d^2\right )\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{4 d^5}\\ &=\frac {\left (3 b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^4}+\frac {b x^3 \sqrt {-c+d x} \sqrt {c+d x}}{4 d^2}+\frac {c^2 \left (3 b c^2+4 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{4 d^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 92, normalized size = 0.78 \begin {gather*} \frac {d x \sqrt {-c+d x} \sqrt {c+d x} \left (3 b c^2+4 a d^2+2 b d^2 x^2\right )+\left (6 b c^4+8 a c^2 d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{8 d^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.29, size = 182, normalized size = 1.54
method | result | size |
risch | \(-\frac {x \left (2 b \,d^{2} x^{2}+4 a \,d^{2}+3 b \,c^{2}\right ) \left (-d x +c \right ) \sqrt {d x +c}}{8 d^{4} \sqrt {d x -c}}+\frac {\left (\frac {c^{2} \ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right ) a}{2 d^{2} \sqrt {d^{2}}}+\frac {3 c^{4} \ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right ) b}{8 d^{4} \sqrt {d^{2}}}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d x -c}\, \sqrt {d x +c}}\) | \(167\) |
default | \(\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (2 \,\mathrm {csgn}\left (d \right ) b \,d^{3} x^{3} \sqrt {d^{2} x^{2}-c^{2}}+4 \sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right ) d^{3} a x +3 \sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right ) d b \,c^{2} x +4 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right )+d x \right ) \mathrm {csgn}\left (d \right )\right ) a \,c^{2} d^{2}+3 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right )+d x \right ) \mathrm {csgn}\left (d \right )\right ) b \,c^{4}\right ) \mathrm {csgn}\left (d \right )}{8 d^{5} \sqrt {d^{2} x^{2}-c^{2}}}\) | \(182\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 142, normalized size = 1.20 \begin {gather*} \frac {\sqrt {d^{2} x^{2} - c^{2}} b x^{3}}{4 \, d^{2}} + \frac {3 \, b c^{4} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{8 \, d^{5}} + \frac {a c^{2} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{2 \, d^{3}} + \frac {3 \, \sqrt {d^{2} x^{2} - c^{2}} b c^{2} x}{8 \, d^{4}} + \frac {\sqrt {d^{2} x^{2} - c^{2}} a x}{2 \, d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.38, size = 90, normalized size = 0.76 \begin {gather*} \frac {{\left (2 \, b d^{3} x^{3} + {\left (3 \, b c^{2} d + 4 \, a d^{3}\right )} x\right )} \sqrt {d x + c} \sqrt {d x - c} - {\left (3 \, b c^{4} + 4 \, a c^{2} d^{2}\right )} \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right )}{8 \, d^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 140, normalized size = 1.19 \begin {gather*} \frac {{\left ({\left (d x + c\right )} {\left (2 \, {\left (d x + c\right )} {\left (\frac {{\left (d x + c\right )} b}{d^{4}} - \frac {3 \, b c}{d^{4}}\right )} + \frac {9 \, b c^{2} d^{16} + 4 \, a d^{18}}{d^{20}}\right )} - \frac {5 \, b c^{3} d^{16} + 4 \, a c d^{18}}{d^{20}}\right )} \sqrt {d x + c} \sqrt {d x - c} - \frac {2 \, {\left (3 \, b c^{4} + 4 \, a c^{2} d^{2}\right )} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{4}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 25.51, size = 1048, normalized size = 8.88 \begin {gather*} \frac {\frac {2\,a\,c^2\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}{\sqrt {-c}-\sqrt {d\,x-c}}+\frac {14\,a\,c^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^3}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^3}+\frac {14\,a\,c^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^5}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^5}+\frac {2\,a\,c^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^7}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^7}}{d^3-\frac {4\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {6\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {4\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}+\frac {d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^8}}-\frac {\frac {23\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^3}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^3}-\frac {3\,b\,c^4\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}{2\,\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}+\frac {333\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^5}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^5}+\frac {671\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^7}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^7}+\frac {671\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^9}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^9}+\frac {333\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{11}}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{11}}+\frac {23\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{13}}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{13}}-\frac {3\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{15}}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{15}}}{d^5-\frac {8\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {28\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {56\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}+\frac {70\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^8}-\frac {56\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{10}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{10}}+\frac {28\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{12}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{12}}-\frac {8\,d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{14}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{14}}+\frac {d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{16}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{16}}}-\frac {2\,a\,c^2\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{d^3}-\frac {3\,b\,c^4\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,d^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________